Math Element and MathVariable Element

Within the <Math> element, calculations can be evaluated using MathVariables.  MathVariables are variables that are used in the Math section of transaction configuration and use the <MathVariable> tag.  A MathVariable name is assigned as the value of the attribute VARIABLENAME.  After you name the MathVariable, you will identify what type of MathVariable you want to create.  There are various types of MathVariables available to configure processing.  MathVariables can be used to pull a field value, create arrays, structure if-then structures, perform calculations with operators or call functions.  Each of the math types has its own set of attributes, sub-elements and possible values, which are listed below.  All MathVariables must have a data type declared using the DATATYPE attribute.

 

Also the <MathVariable> tag, can use a LOG="Yes" attribute, to log results to AsMathActivity.

 

There are also <MathLoop> and <MathIF> elements, which are available to perform loops and if conditions, respectively.  Both must have a data type declared as well.

 

Available DATATYPE options

Note: DATATYPE of either decimal or integer may not be blank and a DEFAULT attribute must be defined.

 

Additionally, the <Math> element may optionally contain the elements <Disbursement> and <Assignment>.  The business event of creating disbursements or assigning money types logically and chronologically applies after math calculations so these tags should be after the appropriate MathVariable calculation has processed.  MathVariables may be used to pass values into spawn configuration.  Math processes from top down in the configuration, as does the ability to use MathVariables in configuration. 

 

Math Element Example

<Math>

   <MathVariables>

       <MathVariable VARIABLENAME="MyVariable" TYPE="VALUE" DATATYPE="INTEGER">0</MathVariable>

   </MathVariables>

   <Assignment TYPE="GrossFullWithdrawalWithAllocations">

       <MoneyType NAME="DisbursementAmountRemoved">32</MoneyType>

   </Assignment>

   <Disbursement DisbursementType="DisbursementMethod" APPROVAL="Yes">

         <DisbursementRole TYPE="GUID" DISBURSEMENTAMOUNT="Activity:DisbursementAmount">Activity:RoleGUID</DisbursementRole>

   </Disbursement>

</Math>